Controller of rotating electric machine

ABSTRACT

A controller of a rotating electric machine includes a current detector detecting a voltage of each of shunt resistors in at least two phases from among the shunt resistors in three phases during an electric current flowing period in which the shunt resistors in the at least two phases have an electric current flowing therein; and a signal generator setting a switching mode of each of switches forming an inverter for controlling an estimated angular velocity to an instruction angular velocity based on the detected voltage. The signal generator sets a switching mode to flow the electric current in the shunt resistors in the at least two phases during at least part of one half of a modulation cycle of control of the estimated angular velocity.

CROSS REFERENCE TO RELATED APPLICATION

The present application is based on and claims the benefit of priorityof Japanese Patent Application No. 2018-202109, filed on Oct. 26, 2018,the disclosure of which is incorporated herein by reference.

TECHNICAL FIELD

The present disclosure generally relates to a control device, forexample, a controller of a rotating electric machine.

BACKGROUND INFORMATION

In the related art, a control device, or a controller is known thatcontrols a rotating electric machine applied to a system, which includesan inverter having switches in upper and lower arms for each of threephases, a synchronous rotating electric machine electrically connectedto the inverter, and a shunt resistor. The shunt resistor iselectrically connected to only one of the upper and lower arms in eachphase.

The control device detects a voltage of each shunt resistor during aperiod in which an electric current is flowing therein. That is, thecontrol device detects the voltage of the shunt resistor having theelectric current flowing therein in such period. The control devicesets, based on the detected voltage, a switching mode in each of carriersignal cycles for each of the switches constituting the inverter bypulse width modulation (PWM) using a carrier signal so as to control anamount of the rotating electric machine to an instruction value.

However, in the above-described control device, a current detectiontiming can be set only once per carrier signal cycle, thus the currentdetection frequency is low.

SUMMARY

It is an object of the present disclosure to provide a control device,or a controller in short, of a rotating electric machine capable ofincreasing a frequency of detection of electric current.

BRIEF DESCRIPTION OF THE DRAWINGS

Objects, features, and advantages of the present disclosure will becomemore apparent from the following detailed description made withreference to the accompanying drawings, in which:

FIG. 1 is a diagram of a configuration of a control system of a rotatingelectric machine according to a first embodiment of the presentdisclosure;

FIG. 2 is a block diagram of a process of a control device;

FIG. 3 is a diagram of a relationship between voltage vectors anddetectable phase currents;

FIG. 4 is a flowchart of a procedure of a change process performed by asignal generator;

FIG. 5 is a flowchart of a procedure of a current detection processperformed by the current detector;

FIG. 6 is a time chart of transition of a high frequency voltage, aninstruction time ratio, and a switching mode in a comparative example;

FIG. 7 is a time chart of transition of the high frequency voltage, theinstruction time ratio, and the switching mode according to the firstembodiment of the present disclosure;

FIG. 8 is a time chart of transition of the high frequency voltage, theinstruction time ratio, and the switching mode according to a firstmodification of the first embodiment of the present disclosure;

FIG. 9 is a diagram of a configuration of the control system accordingto a third modification of the first embodiment of the presentdisclosure;

FIG. 10 is a diagram of a relationship between the voltage vectors andthe detectable phase currents according to the third modification of thefirst embodiment of the present disclosure;

FIG. 11 is a diagram of a space vector divided into six sectionscorresponding to 60-degree voltage vectors according to a secondembodiment of the present disclosure;

FIG. 12 is a diagram of correspondence between sections and phaseinstruction voltages;

FIG. 13 is a diagram of the voltage vectors used in the six sections andratios of appearance times in one modulation cycle of respective voltagevectors;

FIG. 14 is a diagram of a relationship among the voltage vectors, theswitching modes of respective phases, the phase instruction voltages andinstruction voltage vectors of respective phases;

FIG. 15 is a time chart of transitions of the voltage vectors and theswitching modes before changing the voltage vector;

FIG. 16 is a time chart of transitions of the voltage vectors and theswitching modes after changing the voltage vector;

FIG. 17 is a time chart of transition of the voltage vectors and theswitching modes according to a modification of the second embodiment ofthe present disclosure;

FIG. 18 is a time chart of transition of the voltage vectors and theswitching modes according to a third embodiment of the presentdisclosure;

FIG. 19 is a time chart of transition of the voltage vectors and theswitching modes according to a modification of the third embodiment ofthe present disclosure;

FIG. 20 is a diagram of hexagonal space vectors divided into threesections according to a fourth embodiment of the present disclosure;

FIG. 21 is a diagram of correspondence between sections and the phaseinstruction voltages;

FIG. 22 is a diagram of the voltage vectors used in the three sectionsand ratios of appearance times in the one modulation cycle of respectivevoltage vectors;

FIG. 23 is a time chart of transition of the voltage vectors and theswitching modes;

FIG. 24 is a diagram of the hexagonal space vectors divided into threesections according to a modification of the fourth embodiment of thepresent disclosure;

FIG. 25 is a diagram of correspondence between sections and the phaseinstruction voltages;

FIG. 26 is a diagram of the voltage vectors used in three sections andratios of appearance times in the one modulation cycle of respectivevoltage vectors; and

FIG. 27 is a time chart of transition of the voltage vectors and theswitching modes.

DETAILED DESCRIPTION First Embodiment

Hereinafter, the first embodiment of a control device, for example, acontroller, for a rotating electric machine according to the presentdisclosure is described with reference to the drawings.

As shown in FIG. 1, the control system includes a rotating electricmachine 10, an inverter 20, and a controller 40 that controls therotating electric machine 10. The rotating electric machine 10 is athree-phase synchronous machine. The synchronous machine is, forexample, a permanent magnet synchronous machine. In the presentembodiment, the rotating electric machine 10 is an interior permanentmagnet synchronous motor (IPMSM) of a salient pole machine. The rotatingelectric machine 10 is used, for example, to drive an in-vehicleaccessory. Examples of the in-vehicle accessory include a radiator fan,a blower of an air conditioner, and a water pump.

The inverter 20 is provided with a series connection of upper armswitches SUp, SVp, SWp and lower arm switches SUn, SVn, SWn for threephases. In the present embodiment, voltage-controlled semiconductorswitching elements are used as the switches SUp, SUn, SVp, SVn, SWp, andSWn, and more practically, N-channel MOSFETs are used. Therefore, thehigh potential side terminals of the switches SUp, SUn, SVp, SVn, SWp,and SWn are drains, and the low potential side terminals are sources.The switches SUp, SUn, SVp, SVn, SWp, and SWn have body diodes DUp, DUn,DVp, DVn, DWp, and DWn, respectively.

The source of the U-phase upper arm switch SUp is connected to a firstend of a U-phase conductive member 21U such as a bus bar and the drainof the U-phase lower arm switch SUn. A first end of a U-phase winding11U of the rotating electric machine 10 is connected to a second end ofthe U-phase conductive member 21U. The source of the V-phase upper armswitch SVp is connected to a first end of a V-phase conductive member21V such as a bus bar and the drain of the V-phase lower arm switch SVn.A first end of a V-phase winding 11V of the rotating electric machine 10is connected to a second end of the V-phase conductive member 21V. Thesource of the W-phase upper arm switch SWp is connected to a first endof a W-phase conductive member 21W such as a bus bar and the drain ofthe W-phase lower arm switch SWn. A first end of a W-phase winding 11Wof the rotating electric machine 10 is connected to a second end of theW-phase conductive member 21W. The second ends of the U, V, W-phasewindings 11U, 11V, 11W are connected at a neutral point.

The drains of the U, V, W-phase upper arm switches SUp, SVp, SWp and apositive electrode terminal of a storage battery 30, which is a directcurrent (DC) power source, are connected by a positive electrode busline Lp. On the positive electrode bus line Lp, at a position between(i) a connection point to one of the upper arm switches SUp, SVp, SWpwhich is closest to the positive electrode terminal of the storagebattery 30 and (ii) the positive electrode terminal of the storagebattery 30, a first end of a smoothing capacitor 22 is connected.

First ends of U, V, W-phase shunt resistors 23U, 23V, 23W are connectedto sources of the U, V, W-phase lower arm switches SUn, SVn, SWn. Secondends of the U, V, W-phase shunt resistors 23U, 23V, 23W and a negativeelectrode terminal of the storage battery 30 are connected by a negativeelectrode bus line Ln. On the negative electrode bus line Ln, at aposition between (i) a connection point to one of the shunt resistors23U, 23V, 23W which is closest to the negative electrode terminal of thestorage battery 30 and (ii) the negative electrode terminal of thestorage battery 30, a second end of the smoothing capacitor 22 isconnected.

The controller 40 is provided as a microcomputer, in substance, andswitches the switches constituting the inverter 20 in order tofeedback-control a control amount of the rotating electric machine 10 toan instruction value. In the present embodiment, the control amount isan electric angular velocity, that is, a rotation speed, and theinstruction value thereof is an instruction angular velocity ω*. Thecontroller 40 performs a switching operation of each switch of theinverter 20 such that a voltage vector applied from the inverter 20 toeach of the phase windings 11U to 11W becomes an instruction voltagevector for controlling the electric angular velocity to an instructionangular velocity ω*. In such manner, sinusoidal phase currents which are120 degrees apart from each other flow to, or through, the phasewindings 11U, 11V, 11W.

The controller 40 performs a position sensor-less control, and estimatesan electric angle in such control. Position sensor-less control is acontrol of the rotating electric machine 10 without using rotation angleinformation of the rotating electric machine 10 detected by an anglesensor such as a Hall element or a resolver.

Note that the controller 40 realizes various control functions byexecuting a program stored in a storage device, or memory, provided initself. The various functions may be realized by electronic circuitsthat are hardware, or may be realized by using both of hardware andsoftware.

Subsequently, the process of the controller 40 is described in detailusing the block diagram of FIG. 2.

A speed deviation calculator 41 calculates a speed deviation Δω bysubtracting an estimated angular velocity ωest calculated by a speedestimator 51 described later from the instruction angular velocity ω*.The estimated angular velocity ωest is an estimated value of theelectric angular velocity. The instruction angular velocity ω* takes apositive value when rotating the rotor of the rotating electric machine10 in a specific direction, for example, a forward direction, and takesa negative value when the rotor is rotated in a direction opposite tothe specific direction. A speed controller 42 calculates an instructiontorque Trq* of the rotating electric machine 10 as an operation amountfor feedback control of the speed deviation Δω to zero. The instructiontorque Trq* has a positive value when rotating the rotor in a specificdirection, and has a negative value when rotating the rotor in adirection opposite to the specific direction. Note that, for example,proportional integral control may be used as feedback control in thespeed controller 42.

A current converter 43 converts U, V, W-phase currents in a UVWcoordinate system, based on an estimated angle θest calculated by anangle estimator 52 described later and phase currents IU, IV, IWdetected by a current detector 53 described later to a γ axis currentIγr and a δ axis current Iδr in a γδ coordinate system. The estimatedangle θest is an estimated value of the electric angle. The UVWcoordinate system is a three-phase fixed coordinate system of therotating electric machine 10, and the γδ coordinate system is atwo-phase rotation coordinate system of the rotating electric machine10. That is, an estimated coordinate system of a dq coordinate system.

An instruction current setter 44 sets a γ axis instruction current Iγ*and a δ axis instruction current Iδ* based on the instruction torqueTrq*. An instruction current vector in the γδ coordinate system isdetermined by the γ axis instruction current Iγ* and the δ axisinstruction current Iδ*. In the present embodiment, the instructioncurrent setter 44 sets the γ axis instruction current Iγ* to zero.

A γ axis deviation calculator 45 a calculates a γ axis deviation ΔIγ asa value obtained by subtracting the γ axis current Iγr from the yγ axisinstruction current Iγ*. A δ axis deviation calculator 45 b calculates aδ axis deviation AΔIδ as a value obtained by subtracting the δ axiscurrent Iδr from the δ axis instruction current Iδ*.

A current controller 46 calculates a γ axis voltage Vγr as an operationamount for feedback controlling the γ axis current Iγr to the γ axisinstruction current Iγ* based on the γ axis deviation ΔIγ. The currentcontroller 46 also calculates a δ axis voltage Vδr as an operationamount for feedback controlling the δ axis current Iδr to the δ axisinstruction current Iδ* based on the δ axis deviation ΔIδ. Theinstruction voltage vector in the γδ coordinate system is determined bythe γ axis voltage Vγr and the δ axis voltage Vδr. Note thatproportional integral control may be used as feedback control in thecurrent controller 46, for example.

A γ axis superimposer 47 a outputs a sum of the γ axis voltage Vγr and aγ axis high frequency voltage Vγh generated by a high frequency wavegenerator 48 as a γ axis instruction voltage Vγ*. A δ axis superimposer47 b outputs a sum of the δ axis voltage Vδ r and a δ axis highfrequency voltage Vδh generated by a high frequency wave generator 48 asa δ axis instruction voltage Vδ*. The high frequency voltages Vγh andVδh are pulse signals that fluctuate at an angular velocity sufficientlyhigher than the electric angular velocity of the fundamental wavecomponent of each of the instruction voltages Vγ* and Vδ*, and theiramplitude is Va. In the present embodiment, the δ axis high frequencyvoltage Vδh is set to zero. Therefore, the δ axis voltage Vδr becomesthe δ axis instruction voltage Vδ* as it is.

In the present embodiment, the y axis superimposer 47 a, the δ axissuperimposer 47 b, and the high frequency wave generator 48 correspondto a high frequency applicator.

A voltage converter 49 calculates U, V, W-phase instruction voltages VU,VV, VW that are 120° phase shift with each other in the electric anglebased on the γ axis instruction voltage Vγ*, the δ axis instructionvoltage Vδ* and the estimated angle θest. In the present embodiment,each of the instruction voltages VU, VV, VW is a sine wave signal.

A signal generator 50 calculates U, V, W-phase instruction time ratiosDtu, Dtv, Dtw, respectively corresponding to the instruction signal, bydividing the U, V, W-phase instruction voltages VU, VV, VW output fromthe voltage converter 49 by an inter-terminal voltage of the storagebattery 30. In the present embodiment, it is assumed that the maximumvalue of each of the instruction time ratios Dtu, Dtv, Dtw is 1, and theminimum value is 0.

The signal generator 50 generates operation signals gUp, gUn, gVp, gVn,gWp, gWn for the switches SUp, SUn, SVp, SVn, SWp, SWn based on thecalculated U, V, W-phase instruction time ratios Dtu, Dtv, Dtw. Theoperation signal is either an ON instruction or an OFF instruction. Theupper arm operation signal and the lower arm operation signal of thesame phase do not simultaneously become an ON instruction. The signalgenerator 50 outputs the generated operation signals gUp to gWn to theswitches SUp to SWn that constitute the inverter 20. The switching modesof the switches SUp to SWn are determined by the order of the operationsignals gUp to gWn.

The signal generator 50 generates an operation signal by the pulse widthmodulation (PWM) based on magnitude comparison between the instructiontime ratio and a carrier signal SigC in each of the three phases. In thepresent embodiment, the carrier signal SigC is a triangular wave signalin which the gradual increase rate and the gradual decrease rate areequal. In the present embodiment, the amplitude of the carrier signalSigC is set to one half (½). Therefore, the carrier signal SigC takes avalue in the range of 0 to 1, centering on ½.

The speed estimator 51 calculates the estimated angular velocity ωestbased on a δ axis high frequency current Iδh that flows along with theapplication of the γ axis high frequency voltage Vγh. More practically,the speed estimator 51 calculates the estimated angular velocity ωestbased on the δ axis high frequency current Iδh that flows as the γ axishigh frequency voltage Vγh is switched from a positive voltage (Va) to anegative voltage (−Va), and also calculates the estimated angularvelocity ωest based on the δ axis high frequency current Iδh that flowsas the γ axis high frequency voltage Vγh is switched from a negativevoltage to a positive voltage. For example, the speed estimator 51 maycalculate the δ axis high frequency current Iδh by applying a high-passfilter to the δ axis current Iδr.

The angle estimator 52 calculates an estimated angle θest bytime-integrating the estimated angular velocity ωest. In the presentembodiment, the speed estimator 51 and the angle estimator 52 correspondto a high frequency detector and an estimator.

Subsequently, the current detector 53 is described.

The current detector 53 detects the U, V, W-phase currents IU, IV, IWbased on inter-terminal voltages VIU, VIV, VIW of the U, V, W-phaseshunt resistors 23U, 23V, 23W. As shown in FIG. 3, in accordance withthe voltage vectors V0 to V6, the phase current flows in the shuntresistor during an ON period of the lower arm switch. In the presentembodiment, the sign of the voltage across the shunt resistor is definedas positive when the potential of the first end of the shunt resistor ishigher than the potential of the second end of the shunt resistor.Further, with regard to the actual phase current, the direction of thephase current flowing from the inverter 20 to the rotating electricmachine 10 is defined as positive. Therefore, in the “ARM” column inFIG. 3, a negative sign is attached when the sign of the inter-terminalvoltage of the shunt resistor is different from the sign of the actualphase current. Hereinafter, active voltage vectors V1 to V6 are referredto as first to sixth vectors V1 to V6, and reactive voltage vectors V0and V7 may be referred to as zeroth and seventh vectors V0 and V7.

The signal generator 50 determines whether it is in a non-detector armON mode in which all of the U, V, W-phase upper arm operation signalsgUp, gVp, gWp among the generated operation signals gUp to gWn are an ONinstruction respectively. When it is determined as such a non-detectorarm ON mode, the signal generator 50 changes the U, V, W-phase upper armoperation signals gUp, gVp, gWp to the OFF instruction respectively, andchanges the U, V, W-phase lower arm operation signals gUn, gVn, gWn tothe ON instruction respectively. In the present embodiment, the signalgenerator 50 corresponds to a setter.

A procedure of a process performed by the signal generator 50 isdescribed with reference to FIG. 4. This process is repeatedlyperformed, for example, in every predetermined control cycle.

At step S10, it is determined whether all of the generated U, V, W-phaseupper arm operation signals gUp, gVp, gWp have the ON instruction,respectively.

When it is determined at step S10 that all have the ON instruction, theprocess proceeds to step S11, where the U, V, W-phase upper armoperation signals gUp, gVp, gWp are switched to the OFF instruction,respectively, and the U, V, W-phase lower arm operation signals gUn,gVn, gWn are switched to the ON instruction, respectively.

When the process of step S11 is complete, or when the negativedetermination is made at step S10, the process proceeds to step S12. Atstep S12, it is determined whether the carrier signal SigC is at itsmaximum value (i.e., 1) or at its minimum value (i.e., 0). This processis a process for determining whether a present control cycle includeselectric current detection timing.

When an affirmative determination is made at step S12, it is determinedthat it is the current detection timing, the process proceeds to stepS13, and a current detection flag is turned ON. On the other hand, whena negative determination is made at step S12, it is determined that itis not the current detection timing, the process proceeds to step S14,and the current detection flag is turned OFF.

Subsequently, a procedure of a process performed by the current detector53 is described with reference to FIG. 5. This process is repeatedlyperformed, for example, in every predetermined control cycle.

At step S20, it is determined whether the current detection flagobtained from the signal generator 50 is ON. This process is a processfor determining whether a control cycle includes current detectiontiming.

When it is determined at step S20 that the current detection flag is ON,the process proceeds to step S21, and the inter-terminal voltages VIU,VIV, VIW of the U, V, W-phase shunt resistors 23U, 23V, 23W are sampledand held, for example, stored in a memory.

At step S22, the inter-terminal voltages VIU, VIV, VIW sampled and heldas analog data are converted into digital data. The converted digitaldata U, V, W-phase currents IU, IV, IW are output to the currentconverter 43.

Note that the current detector 53 may recognize, without using thecurrent detection flag, the timing at which the carrier signal SigCtakes the maximum value or the minimum value as the current detectiontiming.

An example of how the operation signal is changed is illustrated usingFIG. 6 and FIG. 7. FIG. 6 shows a comparative example in which theoperation signal generated by the signal generator 50 is not changed,and FIG. 7 shows an example of the present embodiment in which thegenerated operation signal is changed.

First, a comparative example shown in FIG. 6 is described. FIG. 6 row(a) shows a transition of the y axis high frequency voltage Vyh formagnetic pole position estimation, FIG. 6 row (b) shows a transition ofrespective phase instruction time ratios Dtu, Dtv, Dtw, and FIG. 6 row(c) shows a transition of the switching mode of each of the switches SUpto SWn. Here, in row (a) of FIG. 6, Tc indicates one cycle(corresponding to one modulation cycle) of the carrier signal SigC.Further, in row (c) of FIG. 6, if the U phase is taken as an example,“ON” in FIG. 6 indicates that the U phase upper arm operation signal gUpis an ON instruction and the U phase lower arm operation signal gUn isan OFF instruction. Further, “OFF” in FIG. 6 indicates that the U-phaseupper arm operation signal gUp is an OFF instruction and the U-phaselower arm operation signal gUn is an ON instruction.

As shown in FIG. 6, in the comparative example, the timing at which thecarrier signal SigC becomes the maximum value is set as a currentdetection timing td. Therefore, the current detection timing td is setonly once in one cycle of the carrier signal SigC. Control of thecontrol amount of the rotating electric machine 10 is performed based onthe phase currents IU, IV, IW detected at the current detection timingtd, and the estimated angle θest is calculated at such timing.Therefore, the switching cycle of the voltage value of the γ axis highfrequency voltage Vγh is set to one cycle of the carrier signal SigC.That is, in other words, one cycle of the γ axis high frequency voltageVγh is set to two cycles of the carrier signal SigC. In such manner, afrequency (e.g., 10 kHz) of the γ axis high frequency voltage Vγh isincluded in the human audible frequency range (e.g., 20 Hz to 20 kHz),which may cause unpleasant noise to the user of the system.

Subsequently, the present embodiment is described with reference to FIG.7. FIG. 7 with row (a) to row (c) correspond to FIG. 6 with row (a) torow (c) described above.

In the present embodiment, the U, V, W-phase upper arm operation

signals gUp, gVp, gWp are all switched to the OFF instruction in aperiod TA during which all of the U, V, W-phase instruction time ratiosDtu, Dtv and Dtw become greater than the carrier signal SigC, and the U,V, W-phase lower arm operation signals gUn, gVn, gWn are all switched tothe ON instruction in the period TA. Therefore, the period TA describedabove is a period of the zeroth vector V0, and electric currents forthree phases become detectable. In such manner, each of (i) the maximumtiming which is when the carrier signal SigC takes the maximum value,and (ii) the minimum timing which is when the carrier signal SigC takesthe minimum value, can be settable as the current detection timing td,and two current detection timings td can be set within one cycle of thecarrier signal SigC. Then, by performing the control of FIG. 2 insynchronization with each of the current detection timings td,responsiveness to the control of the rotating electric machine 10 by thecontrol amount is improvable. During the control described above, evenwhen the operation signal is changed as described above, a line voltageof each phase does not change before and after the change of theoperation signal in the period TA. Therefore, the influence of thechange of the operation signal on the control of the rotating electricmachine 10 by the control amount is reducible. Note that, by setting themax/min timing at which the carrier signal SigC takes the maximum valueor the minimum value to the current detection timing td, the electriccurrent is detectable at the center of fluctuation of the phase currentincluding a ripple component.

Further, since two current detection timings td are set in one cycle ofthe carrier signal SigC, one cycle of the γ axis high frequency voltageVγh can be set as one cycle of the carrier signal SigC. In such manner,the frequency of the γ axis high frequency voltage Vγh can be brought toan outside of the human audible frequency range. In such case, thedetection timing of the δ axis high frequency current Iδh and thecalculation timing of the estimated angle θest are synchronized with thecurrent detection timing td.

Further, in the present embodiment, the period TA is set as a twofoldduration or more of a period Tsta, that is, a ringing convergenceperiod, from the switching of the switching modes to the convergence ofthe ringing of the electric current flowing in the shunt resistoraccompanying the switching of the switching modes. More practically, bysetting “TA≥2×Tsta,” the ringing converges before the current detectiontiming td is reached after the start timing of the period TA. Thereby,the detection accuracy of the phase current is improvable.

When a reactive voltage vector period is set to be too short, theringing described above does not converge within such a period, and thedetection accuracy of the phase current may deteriorate. Therefore, inthe present embodiment, a period during which the U, V, W-phaseinstruction time ratios Dtu, Dtv, Dtw become smaller than the carriersignal SigC and a period during which the U, V, W-phase instruction timeratios Dtu, Dtv, Dtw become greater than the carrier signal SigC areequated. Thus, in each cycle of the carrier signal SigC, the currentdetection timing td is settable in a period in which the ringing hasalready converged. In such manner, the detection accuracy of the phasecurrent is improvable.

Modification 1 of the First Embodiment

As shown in FIG. 8, during a partial period TB, which is part of theperiod TA having part of the non-detector arm ON period described above,including the timing at which the carrier signal SigC has the minimumvalue, the U, V, W-phase upper arm operation signals gUp, gVp, gWp maybe switched to the OFF instruction, and the U, V, W-phase lower armoperation signals gUn, gVn, gWn may be switched to the ON instruction.FIG. 8 corresponds to FIG. 7 described above.

Modification 2 of the First Embodiment

The position of the U-phase shunt resistor 23U is not limited to the oneshown in FIG. 1. That is, the U-phase shunt resistor 23U may be, forexample, disposed at a position between the drain of the U-phase lowerarm switch SUn and the first end of the U-phase conductive member 21 U.The same applies to the V-phase shunt resistor 23V and the W-phase shuntresistor 23W.

Modification 3 of the First Embodiment

As shown in FIG. 9, a shunt resistor may be provided on the upper armside. In FIG. 9, the same components as those already shown in FIG. 1have the same reference numerals for the sake of convenience. First endsof U, V, W-phase shunt resistors 24U, 24V, 24W are respectivelyconnected to drains of the U, V, W-phase upper arm switches SUp, SVp,SWp. Second ends of the U, V, W-phase shunt resistors 24U, 24V, 24W andthe positive electrode terminal of the storage battery 30 are connectedby the positive electrode bus line Lp.

In the present embodiment, as shown in FIG. 10, the phase current flowsin the shunt resistor during the ON period of the upper arm switchaccording to the voltage vectors V1 to V7. Therefore, the process ofstep S10 in FIG. 4 is replaced with a process of determining whether allof the generated U, V, W-phase lower arm operation signals gUn, gVn, gWnare the ON instruction. Further, the process of step S11 in FIG. 4 isreplaced with a process of (i) switching the U, V, W-phase lower armoperation signals gUn, gVn, gWn to the OFF instruction and (ii)switching the U, V, W-phase upper arm operation signals gUp, gVp, gWp tothe ON instruction.

Note that the position of the U-phase shunt resistor 24U is not limitedto the one shown in FIG. 9. That is, the U-phase shunt resistor may be,for example, disposed at a position between the source of the U-phaseupper arm switch SUp and the first end of the U-phase conductive member21U. The same applies to the V-phase shunt resistor 24V and the W-phaseshunt resistor 24W.

Second Embodiment

Hereinafter, the second embodiment is described focusing on differencesfrom the first embodiment with reference to the drawings. In the presentembodiment, space vector modulation (SVM) is used instead of PWM.

The process regarding space vector modulation performed by the signalgenerator 50 of FIG. 2 is described.

FIG. 11 shows a hexagonal space vector. In the present embodiment, thisspace vector is divided into six sections 1 to 6 arranged with a phasedifference of 60 degrees. The signal generator 50 determines to whichsection the instruction voltage vector Vαβ belongs, based on theinstruction voltages VU, VV, and VW output from the voltage converter49. Here, to which section the instruction voltage vector Vαβ belongs isdetermined based on the magnitude relationship of each of theinstruction voltages VU, VV, VW, as shown in FIG. 12.

After a section to which the instruction voltage vector Vαβ belongs isdetermined, the signal generator 50 selects (i) two types of activevoltage vectors and (ii) reactive voltage vectors, as shown in FIG. 13.The two types of active voltage vectors are voltage vectors having aphase difference of 60 degrees with respect to and on both sides of theinstruction voltage vector Vαβ. For example, when the instructionvoltage vector Vαβ belongs to the section 1, the first and secondvoltage vectors V1 and V2 and the 0th and seventh voltage vectors V0 andV7 are selected as voltage vectors used for control.

The signal generator 50 arranges in order the selected voltage vectorsfor each modulation cycle. The switching mode is determined by thearranged-in-order voltage vectors. Here, a period occupied by each ofthe selected voltage vectors in one modulation cycle Tsw is a valueobtained by multiplying one modulation cycle Tsw by the time ratio shownin FIG. 13. The time ratio corresponding to each of the selected voltagevectors is updated based on the calculated instruction voltages VU, VV,VW everytime the U, V, W-phase instruction voltages VU, VV, VW arecalculated by the voltage converter 49. The update timing is insynchronization with the current detection timing td.

Subsequently, the determination of the time ratio as shown in FIG. 13 isfurther described with reference to FIG. 14. In FIG. 14, 1 in the rowsof U, V, W indicates that the upper arm switch is turned ON and thelower arm switch is turned OFF, and 0 indicates that the lower armswitch is turned ON and the upper arm switch is turned OFF. Further,FIG. 14 shows the U, V, W-phase instruction voltages VU, VV, VWrespectively corresponding to the voltage vectors V0 to V7. Ed/2corresponds to the voltage of the positive electrode terminal of thestorage battery 30, and −Ed/2 corresponds to the voltage of the negativeelectrode terminal of the storage battery 30, i.e., zero (0).

The instruction voltage vector Vαβ is defined according to the followingequation (Equation 1). In the following equation (Equation 1), j is animaginary number.

$\begin{matrix}{V_{\alpha \; \beta} = {\sqrt{\frac{2}{3}}\left( {{V_{u} \cdot e^{j \cdot 0}} + {V_{v} \cdot e^{j \cdot \frac{2\; \pi}{3}}} + {V_{w} \cdot e^{j \cdot \frac{4\; \pi}{3}}}}~ \right)}} & \left( {{Equation}\mspace{14mu} 1} \right)\end{matrix}$

As shown in FIG. 11, six sections 1 to 6 are sectioned by six types ofactive voltage vectors which are disposed at intervals of 60 degrees. Anexample of the instruction voltage vector Vαβ belonging to the section 1is described in the following. In this case, the space vector isrepresented by the following equation (Equation 2) using the respectivephase instruction voltages VU, VV, VW based on the above equation(Equation 1).

$\begin{matrix}\begin{matrix}{V_{\alpha \; \beta} = {\sqrt{\frac{2}{3}}\left\{ {{V_{u} \cdot e^{j \cdot 0}} - {V_{v}\left( {e^{j \cdot 0} + e^{j\frac{4\; \pi}{3}}} \right)} + {V_{w} \cdot e^{j\frac{4\; \pi}{3}}}} \right\}}} \\{= {\sqrt{\frac{2}{3}}\left\{ {{\left( {V_{u} - V_{v}} \right)e^{j \cdot 0}} + {\left( {V_{v} - V_{w}} \right)e^{j\frac{\pi}{3}}}} \right\}}}\end{matrix} & \left( {{Equation}\mspace{14mu} 2} \right)\end{matrix}$

On the other hand, by using the instantaneous space vector shown in FIG.14, the instruction voltage vector Vαβ is represented by the followingequation (Equation 3). In the following equation (equation 3), a and bare coefficients.

$\begin{matrix}{V_{\alpha \; \beta} = {{{a \cdot V_{1}} + {b \cdot V_{2}}} = {\sqrt{\frac{2}{3}}{E_{d}\left( {{a \cdot e^{j \cdot 0}} + {b \cdot e^{j\frac{\pi}{3}}}} \right)}}}} & \left( {{Equation}\mspace{14mu} 3} \right)\end{matrix}$

The coefficients a and b can be represented by the following equation(Equation 4) by comparing the right sides of the above equations(Equation 2) and (Equation 3).

$\begin{matrix}{{a = \frac{V_{u} - V_{v}}{E_{d}}},{b = \frac{V_{v} - V_{w}}{E_{d}}}} & \left( {{Equation}\mspace{14mu} 4} \right)\end{matrix}$

Thereby, as shown in FIG. 13, in case of having the instruction voltagevector Vαβ in section 1, the time ratio of the first and second voltagevectors V1 and V2 in one modulation cycle Tsw is determined. The timeratio of the reactive voltage vector is also determined by this timeratio and one modulation cycle Tsw. Similarly, the time ratios of theactive and reactive voltage vectors are determined for sections 2 to 6as well.

Note that, in FIG. 13, the time ratio of the two types of reactivevoltage vectors V0 and V7 may be not equated with each other. Forexample, in order to reduce the number of switching times, only one oftwo types of reactive voltage vectors V0 and V7 may be used.

The signal generator 50, upon determining that the seventh vector V7 isincluded in the selected reactive voltage vector, changes the seventhvector V7 to the zeroth vector V0. This change is implemented to imposea condition that the electric current flows in the shunt resistors of atleast two phases in at least part of one half of one modulation cycle.That is, while the phase current cannot be detected in the period of theseventh vector V7, phase currents of three phases can be detected in theperiod of the zeroth vector V0. In the present embodiment, the signalgenerator 50 corresponds to a selector and a changer.

An example of how voltage vectors are changed is described using FIG. 15and FIG. 16. FIG. 15 shows a state before the change of the seventhvector V7 selected by the signal generator 50, and FIG. 16 shows a stateafter the change of the selected seventh vector V7 to the zeroth vectorV0. FIG. 15 shows an example of the instruction voltage vector Vαβbelonging to section 1 and V1, V2, V0, V7 being selected as voltagevectors. Row (a) of FIG. 15 shows a transition of the voltage vector,and row (b) of FIG. 15 shows a transition of the switching mode. In FIG.15, Tsw indicates one modulation cycle.

Subsequently, FIG. 16 is described. As shown in FIG. 16, the seventhvector V7 is changed to the zeroth vector V0. Thereby, the currentdetection timing can be set twice within one modulation cycle Tsw.

In the present embodiment, an appearance time Tα of each of a pair ofreactive voltage vectors in one modulation cycle Tsw is set to have atwofold duration of the ringing convergence period Tsta, within which aringing of the electric current flowing in the shunt resistoraccompanying a switching of the switching modes converges after theswitching of the switching modes. Further, the periods Tα of the pair ofthe reactive voltage vectors in one modulation cycle Tsw are equal toeach other. In such manner, the detection accuracy of the phase currentis improvable.

According to the present embodiment described above, the same effects asthe first embodiment are achievable.

Modification of Second Embodiment

In FIG. 13, only the seventh vector V7 may be used as the reactivevoltage vector. In such case, the setting process of the voltage vectoras shown in FIG. 16 is performable without performing the settingprocess of the voltage vector shown in FIG. 15.

In the second embodiment, the shunt resistor may be disposed at aposition shown in FIG. 9 of the first embodiment. In this case, thezeroth vector V0 selected as shown in FIG. 15 may be changed to theseventh vector V7 in FIG. 17. Then, the central timing of the period ofthe seventh vector V7 may be set as the current detection timing td.FIG. 17 corresponds to FIG. 16 described above. Further, theconfiguration shown in FIG. 17 also has the appearance time Tα of eachof the seventh vectors V7 in one modulation cycle Tsw after switching ofthe switching modes is set to have at least twofold duration of theringing convergence period Tsta, within which the ringing of theelectric current accompanying the switching of the switching modesconverges. Further, the periods Tα of the pair of seventh vectors V7 inone modulation cycle Tsw are equal to each other.

Third Embodiment

The third embodiment is described below with reference to the drawings,focusing on the differences from the second embodiment.

In the present embodiment, only the zeroth vector V0 is used as thereactive voltage vector in FIG. 13. The signal generator 50 determines asection to which the instruction voltage vector Vαβ belongs by a methodsimilar to that of the second embodiment, and, based on thedetermination result, two types of active voltage vectors and a zerothvector V0 are selected. In the present embodiment, how the selectedvoltage vectors are arranged is different from that in the secondembodiment.

More practically, the signal generator 50 arranges the operation signalsgUp to gWn as the switching mode setting, for the voltage vectors withinone modulation cycle to appear in an order of (a) the selected reactivevoltage vector, (b) an even-number voltage vector from among theselected active voltage vectors, and (c) an odd-number voltage vectorthen the even-number voltage vector from among the selected activevoltage vectors. FIG. 18 shows an example of the instruction voltagevector Vαβ belonging to section 1. Further, FIG. 18 shows an example inwhich the zeroth vector V0 is selected as the reactive voltage vector.

For every modulation cycle Tsw, the voltage vectors are arranged in anorder of the selected zeroth vector, the selected second vector V2, theselected first vector V1, and the selected second vector V2. In suchcase, the current detection timing td is set to the central timing ofthe period of the zeroth vector and to the central timing of the periodof the first vector V1. During the period of the first vector V1, phasecurrents for two phases are detectable. When the phase currents for twophases are detected, the current detector 53 calculates the remainingphase current based on the phase currents for two phases, using therelationship of “IU+IV+IW=0.”

In FIG. 18, the appearance time of each of the first vector V1 and thezeroth vector V0 in one modulation cycle Tsw is set to have the twofoldduration or more of the above-described period Tsta for the ringingconvergence.

According to the present embodiment described above, the same effects asthe second embodiment are achievable.

Modification of the Third Embodiment

In the third embodiment, the shunt resistor may be disposed at aposition shown in FIG. 9. In this case, the signal generator 50 sets theswitching mode, for the appearance of the voltage vectors within everymodulation cycle Tsw in an order of the seventh vector V7, theodd-number voltage vector from among the selected active voltagevectors, and the even-number voltage vector then the odd-number voltagevector from among the selected active voltage vectors. The seventhvector V7 is selected because detection of three phase currents isenabled during the period of the seventh vector. FIG. 19 shows anexample of the instruction voltage vector Vαβ belonging to section 1. Asshown in FIG. 19, the voltage vectors are arranged in an order of theselected seventh vector, the selected first vector V1, the selectedsecond vector V2 and the selected first vector V1 within everymodulation cycle Tsw.

In FIG. 19, the appearance time of each of the second vector V2 and theseventh vector V7 in one modulation cycle Tsw is set to have a twofoldduration or more than the above-described period Tsta of ringingconvergence.

Fourth Embodiment

The fourth embodiment is described below with reference to the drawings,focusing on the differences from the second embodiment. In the presentembodiment, a voltage vector with a phase difference of 120 degrees isselected.

The process regarding space vector modulation performed by the signalgenerator 50 of FIG. 2 is described.

FIG. 20 shows a hexagonal voltage vector space. In the presentembodiment, three sections A to C are divided by three reference linesrespectively shifted by an angle of 120 degrees. A pair of referencelines that define section A sandwich the second vector V2 andrespectively have a phase difference of 60 degrees from the secondvector V2.

The signal generator 50 determines which section the instruction voltagevector Vαβ belongs to, based on the instruction voltages VU, VV, VWoutput from the voltage converter 49. Here, to which section theinstruction voltage vector Vαβ belongs is determined based on themagnitude relationship among the instruction voltages VU, VV, VW, asshown in FIG. 21.

After a section to which the instruction voltage vector Vαβ belongs isdetermined, the signal generator 50 selects two odd-number voltagevectors and one zero voltage vector, as shown in FIG. 22. The two typesof active voltage vectors are voltage vectors sandwiching theinstruction voltage vector Vαβ and having a phase difference of 120degrees with each other. For example, when the instruction voltagevector Vαβ belongs to section A, the first and third vectors V1 and V3and the zeroth vector V0 are selected as voltage vectors used forcontrol.

The signal generator 50 arranges the selected voltage vectors in orderwithin every modulation cycle Tsw. The switching mode is determined bythe arranged-in-order voltage vectors. Here, a period occupied by onemodulation cycle Tsw of each selected voltage vector is a value obtainedby multiplying one modulation cycle Tsw by the time ratio shown in FIG.22. The time ratio corresponding to each of the selected voltage vectorsis updated based on the calculated instruction voltages VU, VV, VWeverytime the U, V, W-phase instruction voltages VU, VV, VW arecalculated by the voltage converter 49. The update timing is insynchronization with the current detection timing td.

Subsequently, the determination of the time ratio is described withreference to a diagram in FIG. 22. Here, an example of the instructionvoltage vector Vαβ belonging to section A is described. In this case,based on the above equation (Equation 1), the instruction voltage vectorVαβ is represented by the following equation (Equation 5) using thephase voltages VU, VV, VW.

$\begin{matrix}\begin{matrix}{V_{\alpha \; \beta} = {\sqrt{\frac{2}{3}}\left\{ {{V_{u}e^{j0}} + {V_{v}e^{j\frac{2\; \pi}{3}}} - {V_{w}\left( {e^{j0} + e^{j\frac{2\pi}{3}}} \right)}} \right\}}} \\{= {\sqrt{\frac{2}{3}}\left\{ {{\left( {V_{u} - V_{v}} \right)e^{j0}} + {\left( {V_{v} - V_{w}} \right)e^{j\frac{2\pi}{3}}}} \right\}}}\end{matrix} & \left( {{Equation}\mspace{14mu} 5} \right)\end{matrix}$

On the other hand, using the instantaneous space vector shown in FIG.14, the instruction voltage vector Vαβ is represented by the followingequation (Equation 6). In the following equation (Equation 6), s and tare coefficients.

$\begin{matrix}\begin{matrix}{V_{\alpha \; \beta} = {{s \cdot V_{1}} + {t \cdot V_{3}}}} \\{= {\sqrt{\frac{2}{3}}{E_{d}\left( {{s \cdot e^{j0}} + {t \cdot e^{j\frac{2\pi}{3}}}} \right)}}}\end{matrix} & \left( {{Equation}\mspace{14mu} 6} \right)\end{matrix}$

The coefficients s and t can be represented by the following equation(Equation 7) by comparing the right sides of the above equations(Equation 5) and (Equation 6).

$\begin{matrix}{{s = \frac{V_{u} - V_{w}}{E_{d}}},{t = \frac{V_{v} - V_{w}}{E_{d}}}} & \left( {{Equation}\mspace{14mu} 7} \right)\end{matrix}$

Thereby, as shown in FIG. 22, in case of the section A, the time ratioof the first and third vectors V1 and V3 in one modulation cycle Tsw isdetermined. The time ratio of the reactive voltage vector is alsodetermined by this time ratio and one modulation cycle Tsw. Similarly,the time ratio of the active voltage vector is determined for sections Band C as well.

The signal generator 50 sets the switching mode by arranging theoperation signals gUp to gWn, for the voltage vectors within onemodulation cycle Tsw to appear in an order of the selected reactivevoltage vector, the odd-number voltage vector having a shorterappearance time from among the selected active voltage vectors, theodd-number voltage vector having a longer appearance time from among theselected active voltage vectors, and the odd-number voltage vectorhaving the shorter appearance time.

FIG. 23 shows an example of the instruction voltage vector Vαβ belongingto section A. For every modulation cycle Tsw, the voltage vectors arearranged in an order of the selected zeroth vector, the selected thirdvector V3, the selected first vector V1, and the selected third vectorV3. In this case, the current detection timing td is set to the centraltiming of the period of the zeroth vector and to the central timing ofthe period of the first vector V1. When the phase currents for twophases are detected, the current detector 53 calculates the remainingphase current based on the phase currents for two phases, using therelationship of “IU+IV+IW=0.”

In FIG. 23, the appearance time of each of the first vector V1 and thezeroth vector V0 in one modulation cycle Tsw is set to have the twofoldduration or more than the above-described period Tsta for the ringingconvergence.

According to the present embodiment described above, the same effects asthe third embodiment are achievable.

Modification of Fourth Embodiment

In the fourth embodiment, the shunt resistor may be disposed at aposition shown in FIG. 9. The process of the controller 40 in themodification of the fourth embodiment is described below.

FIG. 24 shows a hexagonal voltage vector space. In the presentembodiment, three sections D to F are divided by three reference linesrespectively shifted by an angle of 120 degrees. A pair of referencelines that define section D sandwich the first vector V1 andrespectively have a phase difference of 60 degrees from the first vectorV1.

The signal generator 50 determines which section the instruction voltagevector Vαβ belongs to, based on the instruction voltages VU, VV, VWoutput from the voltage converter 49. Here, to which section theinstruction voltage vector Vαβ belongs is determined based on themagnitude relationship among the instruction voltages VU, VV, VW, asshown in FIG. 25.

After a section to which the instruction voltage vector Vαβ belongs isdetermined, the signal generator 50 selects two types of active voltagevectors, that is, two even-number voltage vectors and one zero voltagevector, as shown in FIG. 26. The two types of active voltage vectors arevoltage vectors sandwiching the instruction voltage vector Vαβ andhaving a phase difference of 120 degrees with each other. For example,when the instruction voltage vector Vαβ belongs to section D, the secondand sixth vectors V2 and V6 and the seventh vector V7 are selected asvoltage vectors used for control.

The signal generator 50 arranges the selected voltage vectors in anorder within every modulation cycle Tsw. The switching mode isdetermined by the arranged-in-order voltage vectors. Here, a periodoccupied by each of the selected voltage vectors in one modulation cycleTsw is a value obtained by multiplying one modulation cycle Tsw by thetime ratio shown in FIG. 26. The time ratio corresponding to each of theselected voltage vectors is updated based on the calculated instructionvoltages VU, VV, VW everytime the U, V, W-phase instruction voltages VU,VV, VW are calculated by the voltage converter 49. The update timing isin synchronization with the current detection timing td.

The signal generator 50 sets the switching mode, for the voltage vectorswithin one modulation cycle Tsw to appear in an order of the selectedreactive voltage vector, the even-number voltage vector having a shorterappearance time from among the selected active voltage vectors, theeven-number voltage vector having a longer appearance time from amongthe selected active voltage vectors, and the even-number voltage vectorhaving the shorter appearance time from among the selected activevoltage vectors. FIG. 27 shows an example of the instruction voltagevector Vαβ belonging to section F. As shown in FIG. 27, voltage vectorsare arranged in an order of the selected seventh vector V7, the selectedsixth vector V6, the selected fourth vector V4, and the selected sixthvector V6 for each modulation cycle Tsw.

In FIG. 27, the appearance time of each of the fourth vector V4 and theseventh vector V7 in one modulation cycle Tsw is set to have the twofoldduration, that is, twice as long or more, of the period Tsta for theringing convergence.

Other Embodiments

The above embodiments may be modified as follows.

The instruction signal to be compared with the carrier signal is notlimited to the instruction time ratio, but may also be an instructionvoltage. In such case, the amplitude of the carrier signal may bevariably set according to the magnitude of the amplitude of theinstruction voltage.

The control of the rotating electric machine 10 may be performed usingthe rotation angle information of the rotating electric machine 10detected by an angle sensor such as a Hall element or a resolver,without performing position sensor-less control.

The switches constituting the inverter are not limited to MOSFET, butmay also be an IGBT, for example. In such case, a high potentialterminal of the switch is a collector and a low potential terminal is anemitter. In addition, free wheel diodes are connected in antiparallel orreversely to the switches.

Further, the switches constituting the inverter 20 are not limited tothe voltage control type, but may also be a current control type, suchas a bipolar transistor or the like.

The control amount of the rotating electric machine is not limited tothe rotation speed, but may also be, for example, a torque.

The rotating electric machine is not limited to the star-connectiontype, but may also be the Δ-connection type. Further, the rotatingelectric machine is not limited to the one used to drive an in-vehicleaccessory, but may also be the one used as an in-vehicle travel powersource, providing thrusting power for a travel of the vehicle. Inaddition, the rotating electric machine is not limited to a permanentmagnet synchronous machine, but may also be, for example, a windingfield type synchronous machine or a synchronous reluctance motor.

What is claimed is:
 1. A controller of a system, wherein the systemincludes an inverter having switches in upper and lower arms of threephases, a rotating electric machine of synchronous type electricallyconnected to the inverter, and shunt resistors electrically connected tothe switches only in the upper arm or the lower arm of the three phases,the controller comprising: a current detector configured to detect avoltage of each of the shunt resistors during a period in which theshunt resistors in at least two of the three phases have an electriccurrent flowing therein; and a setter configured to set a switching modeof each of the switches of the inverter for controlling a control amountof the rotating electric machine to an instruction value based on thedetected voltage of each of the shunt resistors, wherein the setter setsthe switching mode of each of the switches to flow the electric currentto the shunt resistors in the at least two of the three phases during atleast part of one half of one modulation cycle for a control of thecontrol amount.
 2. The controller of claim 1, wherein the setter setsthe switching mode according to a pulse width modulation based on acomparison of magnitudes between an instruction signal and a carriersignal, the upper and lower arms are provided either as a detector armhaving the shunt resistors or a non-detector arm not having the shuntresistors, the switching mode includes a non-detector arm ON mode inwhich all of the switches in the non-detector arm are turned ON, thesetter changes, on a condition that a current switching mode currentlybeing set is the non-detector arm ON mode, and the current switchingmode changes to a different switching mode in which (i) all of theswitches in the non-detector arm are turned OFF and (ii) all of theswitches in the detector arm are turned ON during at least part of anon-detector arm ON period in which the switching mode is set to thenon-detector arm ON mode, including a carrier signal extremal timing atwhich the carrier signal takes an extreme value.
 3. The controller ofclaim 2, wherein the at least part of the non-detector arm ON period,including the carrier signal extremal timing, has at least a twofoldduration of a ringing convergence period within which a ringing of theelectric current flowing in the shunt resistor accompanying a switchingof the switching modes converges after the switching of the switchingmodes.
 4. The controller of claim 3, wherein the switching mode setaccording to the pulse width modulation has a configuration whichincludes (i) a first period in which all the switches in the upper armare turned ON and all the switches in the lower arm are turned OFF and(ii) a second period in which all the switches in the upper arm areturned OFF and all the switches in the lower arm are turned ON.
 5. Thecontroller of claim 1, wherein the setter sets the switching mode by aspace vector modulation for using an average voltage vector in the onemodulation cycle as an instruction voltage vector, based on a conditionof flowing the electric current in the shunt resistors of the at leasttwo phases in the at least part of one half of the one modulation cycle.6. The controller of claim 5, wherein the shunt resistors areelectrically connected only to the lower arm switches, and the setterperforms the switching mode setting process that (i) selects two typeactive voltage vectors binding the instruction voltage vector with a 60degree phase difference and a reactive voltage vector and (ii) arranges,within the one modulation cycle, the voltage vectors to appear in anorder of (a) the selected reactive voltage vector, (b) an even-numbervoltage vector from among the selected active voltage vectors, and (c)an odd-number voltage vector then the even-number voltage vector fromamong the selected active voltage vectors.
 7. The controller of claim 6,wherein an appearance period of each of the reactive voltage vector andthe odd-number voltage vector is set to be equal to or longer than atwofold duration of a ringing convergence period for converging aringing of the electric current flowing in the shunt resistor afterswitching mode switching, which is caused accompanying the switching ofthe switching mode.
 8. The controller of claim 5, wherein the shuntresistors are electrically connected only to the lower arm switches, thesetter includes a selector and a changer, the selector selecting (i) twotype active voltage vectors binding the instruction voltage vector with60 degree phase difference and (ii) a reactive voltage vector, and thechanger, if the selected reactive voltage vector includes a reactivevoltage vector indicative of a switching mode in which each of the alllower-arm switches is turned OFF and each of the all upper arm switchesis turned ON, converting the selected reactive voltage vector to areactive voltage vector indicative of a switching mode in which each ofthe all lower-arm switches is turned ON and each of the all upper armswitches is turned OFF, and the setter performs the switching modesetting process that arranges, within one modulation cycle, the voltagevectors to appear in an order of (a) the selected reactive voltagevector, (b) an odd-number voltage vector from among the selected activevoltage vectors, (c) an even-number voltage vector from among theselected active voltage vectors, (d) the changed reactive voltagevector, and (e) the even-number active voltage vector and the odd-numberactive voltage vector.
 9. The controller of claim 5, wherein the shuntresistors are electrically connected only to the upper arm switches, thesetter performs the switching mode setting process that (i) selects twotype active voltage vectors binding the instruction voltage vector witha 60 degree phase difference and a reactive voltage vector, and (ii)arranges, within one modulation cycle, the voltage vectors to appear inan order of (a) the selected reactive voltage vector, (b) an odd-numbervoltage vector from among the selected active voltage vectors, and (c)an even-number voltage vector then the odd-number voltage vector fromamong the selected active voltage vectors.
 10. The controller of claim9, wherein an appearance period of each of the reactive voltage vectorand the even-number voltage vector is set to be equal to or longer thana twofold duration of a ringing convergence period for converging aringing of the electric current flowing in the shunt resistor afterswitching mode switching, which is caused accompanying the switching ofthe switching mode.
 11. The controller of claim 5, wherein the shuntresistors are electrically connected only to the upper arm switches, thesetter includes a selector and a changer, the selector selecting (i) twotype active voltage vectors binding the instruction voltage vector witha 60 degree phase difference and (ii) an reactive voltage vector, andthe changer, if the selected reactive voltage vector includes a reactivevoltage vector indicative of a switching mode in which each of the alllower-arm switches is turned ON and each of the all upper arm switchesis turned OFF, changing the selected reactive voltage vector to areactive voltage vector indicative of a switching mode in which each ofthe all upper arm switches is turned ON and each of the all lower-armswitches is turned OFF, and the setter performs the switching modesetting process that arranges, within the one modulation cycle, thevoltage vectors to appear in an order of (a) the converted reactivevoltage vector, (b) an odd-number voltage vector from among the selectedactive voltage vectors, (c) an even-number voltage vector from among theselected active voltage vectors, (d) the selected reactive voltagevector, and (e) the even-number active voltage vector and the odd-numberactive voltage vector.
 12. The controller of claim 8, wherein anappearance period of the converted reactive voltage vector is made equalto an appearance period of the pre-changed reactive voltage vector. 13.The controller of claim 5, wherein the setter performs the switchingmode setting process that (i) selects two type active voltage vectorsbinding the instruction voltage vector with 60 degree phase differenceand an reactive voltage vector, and (ii) arranges, within the onemodulation cycle, the voltage vectors to appear in an order of (a) theselected reactive voltage vector, (b) a voltage vector having a shorterappearance period from among the selected active voltage vectors, and(c) a voltage vector having a longer appearance period from among theselected active voltage vectors.
 14. The controller of claim 13, whereinan appearance period of each of the reactive voltage vector and thevoltage vector having the longer appearance period is set to be equal toor longer than a twofold duration of a ringing convergence period aftera switching of the switching mode for converging a ringing of theelectric current flowing in the shunt resistor which is caused by theswitching of the switching mode.
 15. The controller of claim 1, furthercomprising: a high frequency applicator configured to apply a highfrequency voltage to winding of the rotating electric machine; a highfrequency detector configured to detect, based on the voltage detectedby the current detector, a high frequency current flowing in the windingaccompanying an application of the high frequency voltage; and anestimator configured to estimate a magnetic pole position of therotating electric machine based on the high frequency current detectedby the high frequency detector, wherein the high frequency applicatorapplies a high frequency voltage having a same cycle as the duration ofthe modulation cycle, the high frequency detector detects the highfrequency current every time the high frequency current applied by thehigh frequency applicator changes, and the estimator estimates themagnetic pole position every time the high frequency current is detectedby the high frequency detector.
 16. The controller of claim 3, whereinthe switching mode set according to the pulse width modulation has aconfiguration in which (i) a first period in which all the switches inthe upper arm are turned ON and all the switches in the lower arm areturned OFF has a same duration as (ii) a second period in which all theswitches in the upper arm are turned OFF and all the switches in thelower arm are turned ON.